home *** CD-ROM | disk | FTP | other *** search
/ United Public Domain Gold 2 / United Public Domain Gold 2.iso / utilities / pu660.dms / pu660.adf / Vmem / README < prev    next >
Text File  |  1991-12-19  |  4KB  |  84 lines

  1. Hello there, and welcome to the (almost working ;-) world of VMem!
  2.  
  3. VMem attempts to add virtual memory to the standard Amiga OS. This version
  4. requires a 68030 based Amiga. You can change the following #defines in
  5. vmem.c to fine-tune vmem (at least until a debugged version parses the command
  6. line):
  7.  
  8. DEF_SWAP_FILE_NAME    =    "work:.VMEM_PAGES"
  9. DEF_NUMFRAMES        =    0x80    /* 1M of frame space */
  10. DEF_NUMPAGES        =    0x200    /* 4M of pages */
  11.  
  12. Please note that the current version was developed and compiled under 1.3, but
  13. preliminary tests indicate that it works (or doesn't work) under 2.x as well.
  14. Use the memtest program to test VMem. Be very careful running programs that
  15. write to disk while VMem is running, since it still crashes in nasty and
  16. unexpected ways (you have been warned :-).
  17.  
  18. There are a few known design bugs which I am aware of:
  19.  
  20. 1) DMA devices that write to virtual memory are hosed. One solution would be
  21. to hook the dos.library vectors to Read() and Write(), and change those
  22. functions so they work one page at a time. The hook could then force a page
  23. into memory before DMA took place (just an idea). This would also fix the
  24. problem with the paging device driver faulting---this event means the page
  25. daemon can't replace faulted pages! For now, don't try running disk IO tasks
  26. as VMem tests!
  27.  
  28. 2) Access to the system free memory list is not arbitrated with a semaphore.
  29. This could cause big problems, since a task could fault while AllocMem()ing,
  30. another task could modify the mem list, then the faulted task could restart
  31. and be holding on to a corrupt list (since Forbid() was broken!). Solution-
  32. hook AllocMem()/FreeMem() and add a semaphore for the virtual memory pool.
  33. That way only one task could fault at a time.
  34.  
  35. 3) Anyone breaking the rules concerning the use of MEMF_PUBLIC where it needs
  36. to be used is hosed. This is a good thing as far as I'm concerned.
  37.  
  38. Please use me as a clearing house for bug fixes to VMem. If you absolutely
  39. HAVE to release your very own version (like if it runs only on very weird
  40. hardware or something), please append your initials to the version number.
  41.  
  42. Tech Notes:
  43.  
  44. VMem works by setting up a page table with the '030's MMU, keeping track of
  45. in-use frames with a background page ageing daemon, and handling the page
  46. faults by putting the faulted task to sleep. Putting the faulted task to
  47. sleep correctly was the tricky part, and had to be coded in assembly.
  48. (The rest of VMem compiles with LC 5.1) The trick is pretty simple really:
  49. when a task faults, record its stack frame and state into an allocated
  50. buffer, fake in a harmless exception in a new stack (also part of the buffer),
  51. signal the page daemon and go to sleep. The page daemon then fixes up the
  52. fault, replaces the saved fault frame, restarts the faulted task and deallocates
  53. the buffer.
  54.  
  55. Have fun!
  56.  
  57.     - Ed
  58.  
  59. Internet: eah1@cec1.wustl.edu
  60.  
  61. USNail:    Edward Hutchins,
  62.         #1W 6635 Washington Ave.,
  63.         St. Louis, MO 63130
  64.  
  65. Legal stuff:
  66.  
  67.     VMem - a virtual memory system for the Amiga
  68.     Version 0.1 Copyright ©1990,91 Hutchins Software
  69.  
  70.     This program is free software; you can redistribute it and/or modify
  71.     it under the terms of the GNU General Public License as published by
  72.     the Free Software Foundation; either version 1, or (at your option)
  73.     any later version.
  74.  
  75.     This program is distributed in the hope that it will be useful,
  76.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  77.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  78.     GNU General Public License for more details.
  79.  
  80.     You should have received a copy of the GNU General Public License
  81.     along with this program; if not, write to the Free Software
  82.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  83.  
  84.